package com.itheima.operator;

public class shuixianhua {
    public static void main(String[] args) {
        //水仙花、定义一个for。
        int count =0;

        for (int i = 100; i <= 999 ; i++) {

            int ge = i % 10;
            int shi = i  / 10 % 10;
            int bai = i /100;

        if (ge * ge * ge + shi * shi * shi + bai * bai * bai == i){
                System.out.print(i + "\t");
                count++;
            }
        }
        System.out.println();
        System.out.println("水仙花数有多少个"+count);
    }
}
